// File generated from our OpenAPI spec by Stainless.

package com.metest.api.services.async

import com.metest.api.core.ClientOptions
import com.metest.api.core.RequestOptions
import com.metest.api.core.http.HttpResponse
import com.metest.api.core.http.HttpResponseFor
import com.metest.api.models.pet.Pet
import com.metest.api.models.pet.PetCreateParams
import com.metest.api.models.pet.PetDeleteParams
import com.metest.api.models.pet.PetFindByStatusParams
import com.metest.api.models.pet.PetFindByTagsParams
import com.metest.api.models.pet.PetListParams
import com.metest.api.models.pet.PetRetrieveParams
import com.metest.api.models.pet.PetUpdateParams
import com.metest.api.models.pet.PetUpdateWithFormParams
import com.metest.api.models.pet.PetUploadImageParams
import com.metest.api.models.pet.PetUploadImageResponse
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer

interface PetServiceAsync {

    /**
     * Returns a view of this service that provides access to raw HTTP responses for each method.
     */
    fun withRawResponse(): WithRawResponse

    /**
     * Returns a view of this service with the given option modifications applied.
     *
     * The original service is not modified.
     */
    fun withOptions(modifier: Consumer<ClientOptions.Builder>): PetServiceAsync

    /** Add a new pet to the store */
    fun create(params: PetCreateParams): CompletableFuture<Pet> =
        create(params, RequestOptions.none())

    /** @see create */
    fun create(
        params: PetCreateParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Pet>

    /** @see create */
    fun create(
        pet: Pet,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Pet> = create(PetCreateParams.builder().pet(pet).build(), requestOptions)

    /** @see create */
    fun create(pet: Pet): CompletableFuture<Pet> = create(pet, RequestOptions.none())

    /** Returns a single pet */
    fun retrieve(petId: Long): CompletableFuture<Pet> = retrieve(petId, PetRetrieveParams.none())

    /** @see retrieve */
    fun retrieve(
        petId: Long,
        params: PetRetrieveParams = PetRetrieveParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Pet> = retrieve(params.toBuilder().petId(petId).build(), requestOptions)

    /** @see retrieve */
    fun retrieve(
        petId: Long,
        params: PetRetrieveParams = PetRetrieveParams.none(),
    ): CompletableFuture<Pet> = retrieve(petId, params, RequestOptions.none())

    /** @see retrieve */
    fun retrieve(
        params: PetRetrieveParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Pet>

    /** @see retrieve */
    fun retrieve(params: PetRetrieveParams): CompletableFuture<Pet> =
        retrieve(params, RequestOptions.none())

    /** @see retrieve */
    fun retrieve(petId: Long, requestOptions: RequestOptions): CompletableFuture<Pet> =
        retrieve(petId, PetRetrieveParams.none(), requestOptions)

    /** Update an existing pet by Id */
    fun update(params: PetUpdateParams): CompletableFuture<Pet> =
        update(params, RequestOptions.none())

    /** @see update */
    fun update(
        params: PetUpdateParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Pet>

    /** @see update */
    fun update(
        pet: Pet,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Pet> = update(PetUpdateParams.builder().pet(pet).build(), requestOptions)

    /** @see update */
    fun update(pet: Pet): CompletableFuture<Pet> = update(pet, RequestOptions.none())

    /** Get all Pets paged */
    fun list(): CompletableFuture<List<Pet>> = list(PetListParams.none())

    /** @see list */
    fun list(
        params: PetListParams = PetListParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<List<Pet>>

    /** @see list */
    fun list(params: PetListParams = PetListParams.none()): CompletableFuture<List<Pet>> =
        list(params, RequestOptions.none())

    /** @see list */
    fun list(requestOptions: RequestOptions): CompletableFuture<List<Pet>> =
        list(PetListParams.none(), requestOptions)

    /** Deletes a pet */
    fun delete(petId: Long): CompletableFuture<Void?> = delete(petId, PetDeleteParams.none())

    /** @see delete */
    fun delete(
        petId: Long,
        params: PetDeleteParams = PetDeleteParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Void?> = delete(params.toBuilder().petId(petId).build(), requestOptions)

    /** @see delete */
    fun delete(
        petId: Long,
        params: PetDeleteParams = PetDeleteParams.none(),
    ): CompletableFuture<Void?> = delete(petId, params, RequestOptions.none())

    /** @see delete */
    fun delete(
        params: PetDeleteParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Void?>

    /** @see delete */
    fun delete(params: PetDeleteParams): CompletableFuture<Void?> =
        delete(params, RequestOptions.none())

    /** @see delete */
    fun delete(petId: Long, requestOptions: RequestOptions): CompletableFuture<Void?> =
        delete(petId, PetDeleteParams.none(), requestOptions)

    /** Multiple status values can be provided with comma separated strings */
    fun findByStatus(): CompletableFuture<List<Pet>> = findByStatus(PetFindByStatusParams.none())

    /** @see findByStatus */
    fun findByStatus(
        params: PetFindByStatusParams = PetFindByStatusParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<List<Pet>>

    /** @see findByStatus */
    fun findByStatus(
        params: PetFindByStatusParams = PetFindByStatusParams.none()
    ): CompletableFuture<List<Pet>> = findByStatus(params, RequestOptions.none())

    /** @see findByStatus */
    fun findByStatus(requestOptions: RequestOptions): CompletableFuture<List<Pet>> =
        findByStatus(PetFindByStatusParams.none(), requestOptions)

    /**
     * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
     */
    fun findByTags(): CompletableFuture<List<Pet>> = findByTags(PetFindByTagsParams.none())

    /** @see findByTags */
    fun findByTags(
        params: PetFindByTagsParams = PetFindByTagsParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<List<Pet>>

    /** @see findByTags */
    fun findByTags(
        params: PetFindByTagsParams = PetFindByTagsParams.none()
    ): CompletableFuture<List<Pet>> = findByTags(params, RequestOptions.none())

    /** @see findByTags */
    fun findByTags(requestOptions: RequestOptions): CompletableFuture<List<Pet>> =
        findByTags(PetFindByTagsParams.none(), requestOptions)

    /** Updates a pet in the store with form data */
    fun updateWithForm(petId: Long): CompletableFuture<Void?> =
        updateWithForm(petId, PetUpdateWithFormParams.none())

    /** @see updateWithForm */
    fun updateWithForm(
        petId: Long,
        params: PetUpdateWithFormParams = PetUpdateWithFormParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Void?> =
        updateWithForm(params.toBuilder().petId(petId).build(), requestOptions)

    /** @see updateWithForm */
    fun updateWithForm(
        petId: Long,
        params: PetUpdateWithFormParams = PetUpdateWithFormParams.none(),
    ): CompletableFuture<Void?> = updateWithForm(petId, params, RequestOptions.none())

    /** @see updateWithForm */
    fun updateWithForm(
        params: PetUpdateWithFormParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Void?>

    /** @see updateWithForm */
    fun updateWithForm(params: PetUpdateWithFormParams): CompletableFuture<Void?> =
        updateWithForm(params, RequestOptions.none())

    /** @see updateWithForm */
    fun updateWithForm(petId: Long, requestOptions: RequestOptions): CompletableFuture<Void?> =
        updateWithForm(petId, PetUpdateWithFormParams.none(), requestOptions)

    /** uploads an image */
    fun uploadImage(
        petId: Long,
        params: PetUploadImageParams,
    ): CompletableFuture<PetUploadImageResponse> = uploadImage(petId, params, RequestOptions.none())

    /** @see uploadImage */
    fun uploadImage(
        petId: Long,
        params: PetUploadImageParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<PetUploadImageResponse> =
        uploadImage(params.toBuilder().petId(petId).build(), requestOptions)

    /** @see uploadImage */
    fun uploadImage(params: PetUploadImageParams): CompletableFuture<PetUploadImageResponse> =
        uploadImage(params, RequestOptions.none())

    /** @see uploadImage */
    fun uploadImage(
        params: PetUploadImageParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<PetUploadImageResponse>

    /** A view of [PetServiceAsync] that provides access to raw HTTP responses for each method. */
    interface WithRawResponse {

        /**
         * Returns a view of this service with the given option modifications applied.
         *
         * The original service is not modified.
         */
        fun withOptions(modifier: Consumer<ClientOptions.Builder>): PetServiceAsync.WithRawResponse

        /**
         * Returns a raw HTTP response for `post /pet`, but is otherwise the same as
         * [PetServiceAsync.create].
         */
        fun create(params: PetCreateParams): CompletableFuture<HttpResponseFor<Pet>> =
            create(params, RequestOptions.none())

        /** @see create */
        fun create(
            params: PetCreateParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<Pet>>

        /** @see create */
        fun create(
            pet: Pet,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<Pet>> =
            create(PetCreateParams.builder().pet(pet).build(), requestOptions)

        /** @see create */
        fun create(pet: Pet): CompletableFuture<HttpResponseFor<Pet>> =
            create(pet, RequestOptions.none())

        /**
         * Returns a raw HTTP response for `get /pet/{petId}`, but is otherwise the same as
         * [PetServiceAsync.retrieve].
         */
        fun retrieve(petId: Long): CompletableFuture<HttpResponseFor<Pet>> =
            retrieve(petId, PetRetrieveParams.none())

        /** @see retrieve */
        fun retrieve(
            petId: Long,
            params: PetRetrieveParams = PetRetrieveParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<Pet>> =
            retrieve(params.toBuilder().petId(petId).build(), requestOptions)

        /** @see retrieve */
        fun retrieve(
            petId: Long,
            params: PetRetrieveParams = PetRetrieveParams.none(),
        ): CompletableFuture<HttpResponseFor<Pet>> = retrieve(petId, params, RequestOptions.none())

        /** @see retrieve */
        fun retrieve(
            params: PetRetrieveParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<Pet>>

        /** @see retrieve */
        fun retrieve(params: PetRetrieveParams): CompletableFuture<HttpResponseFor<Pet>> =
            retrieve(params, RequestOptions.none())

        /** @see retrieve */
        fun retrieve(
            petId: Long,
            requestOptions: RequestOptions,
        ): CompletableFuture<HttpResponseFor<Pet>> =
            retrieve(petId, PetRetrieveParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `put /pet`, but is otherwise the same as
         * [PetServiceAsync.update].
         */
        fun update(params: PetUpdateParams): CompletableFuture<HttpResponseFor<Pet>> =
            update(params, RequestOptions.none())

        /** @see update */
        fun update(
            params: PetUpdateParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<Pet>>

        /** @see update */
        fun update(
            pet: Pet,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<Pet>> =
            update(PetUpdateParams.builder().pet(pet).build(), requestOptions)

        /** @see update */
        fun update(pet: Pet): CompletableFuture<HttpResponseFor<Pet>> =
            update(pet, RequestOptions.none())

        /**
         * Returns a raw HTTP response for `get /pet`, but is otherwise the same as
         * [PetServiceAsync.list].
         */
        fun list(): CompletableFuture<HttpResponseFor<List<Pet>>> = list(PetListParams.none())

        /** @see list */
        fun list(
            params: PetListParams = PetListParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<List<Pet>>>

        /** @see list */
        fun list(
            params: PetListParams = PetListParams.none()
        ): CompletableFuture<HttpResponseFor<List<Pet>>> = list(params, RequestOptions.none())

        /** @see list */
        fun list(requestOptions: RequestOptions): CompletableFuture<HttpResponseFor<List<Pet>>> =
            list(PetListParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `delete /pet/{petId}`, but is otherwise the same as
         * [PetServiceAsync.delete].
         */
        fun delete(petId: Long): CompletableFuture<HttpResponse> =
            delete(petId, PetDeleteParams.none())

        /** @see delete */
        fun delete(
            petId: Long,
            params: PetDeleteParams = PetDeleteParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponse> =
            delete(params.toBuilder().petId(petId).build(), requestOptions)

        /** @see delete */
        fun delete(
            petId: Long,
            params: PetDeleteParams = PetDeleteParams.none(),
        ): CompletableFuture<HttpResponse> = delete(petId, params, RequestOptions.none())

        /** @see delete */
        fun delete(
            params: PetDeleteParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponse>

        /** @see delete */
        fun delete(params: PetDeleteParams): CompletableFuture<HttpResponse> =
            delete(params, RequestOptions.none())

        /** @see delete */
        fun delete(petId: Long, requestOptions: RequestOptions): CompletableFuture<HttpResponse> =
            delete(petId, PetDeleteParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `get /pet/findByStatus`, but is otherwise the same as
         * [PetServiceAsync.findByStatus].
         */
        fun findByStatus(): CompletableFuture<HttpResponseFor<List<Pet>>> =
            findByStatus(PetFindByStatusParams.none())

        /** @see findByStatus */
        fun findByStatus(
            params: PetFindByStatusParams = PetFindByStatusParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<List<Pet>>>

        /** @see findByStatus */
        fun findByStatus(
            params: PetFindByStatusParams = PetFindByStatusParams.none()
        ): CompletableFuture<HttpResponseFor<List<Pet>>> =
            findByStatus(params, RequestOptions.none())

        /** @see findByStatus */
        fun findByStatus(
            requestOptions: RequestOptions
        ): CompletableFuture<HttpResponseFor<List<Pet>>> =
            findByStatus(PetFindByStatusParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `get /pet/findByTags`, but is otherwise the same as
         * [PetServiceAsync.findByTags].
         */
        fun findByTags(): CompletableFuture<HttpResponseFor<List<Pet>>> =
            findByTags(PetFindByTagsParams.none())

        /** @see findByTags */
        fun findByTags(
            params: PetFindByTagsParams = PetFindByTagsParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<List<Pet>>>

        /** @see findByTags */
        fun findByTags(
            params: PetFindByTagsParams = PetFindByTagsParams.none()
        ): CompletableFuture<HttpResponseFor<List<Pet>>> = findByTags(params, RequestOptions.none())

        /** @see findByTags */
        fun findByTags(
            requestOptions: RequestOptions
        ): CompletableFuture<HttpResponseFor<List<Pet>>> =
            findByTags(PetFindByTagsParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `post /pet/{petId}`, but is otherwise the same as
         * [PetServiceAsync.updateWithForm].
         */
        fun updateWithForm(petId: Long): CompletableFuture<HttpResponse> =
            updateWithForm(petId, PetUpdateWithFormParams.none())

        /** @see updateWithForm */
        fun updateWithForm(
            petId: Long,
            params: PetUpdateWithFormParams = PetUpdateWithFormParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponse> =
            updateWithForm(params.toBuilder().petId(petId).build(), requestOptions)

        /** @see updateWithForm */
        fun updateWithForm(
            petId: Long,
            params: PetUpdateWithFormParams = PetUpdateWithFormParams.none(),
        ): CompletableFuture<HttpResponse> = updateWithForm(petId, params, RequestOptions.none())

        /** @see updateWithForm */
        fun updateWithForm(
            params: PetUpdateWithFormParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponse>

        /** @see updateWithForm */
        fun updateWithForm(params: PetUpdateWithFormParams): CompletableFuture<HttpResponse> =
            updateWithForm(params, RequestOptions.none())

        /** @see updateWithForm */
        fun updateWithForm(
            petId: Long,
            requestOptions: RequestOptions,
        ): CompletableFuture<HttpResponse> =
            updateWithForm(petId, PetUpdateWithFormParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `post /pet/{petId}/uploadImage`, but is otherwise the
         * same as [PetServiceAsync.uploadImage].
         */
        fun uploadImage(
            petId: Long,
            params: PetUploadImageParams,
        ): CompletableFuture<HttpResponseFor<PetUploadImageResponse>> =
            uploadImage(petId, params, RequestOptions.none())

        /** @see uploadImage */
        fun uploadImage(
            petId: Long,
            params: PetUploadImageParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<PetUploadImageResponse>> =
            uploadImage(params.toBuilder().petId(petId).build(), requestOptions)

        /** @see uploadImage */
        fun uploadImage(
            params: PetUploadImageParams
        ): CompletableFuture<HttpResponseFor<PetUploadImageResponse>> =
            uploadImage(params, RequestOptions.none())

        /** @see uploadImage */
        fun uploadImage(
            params: PetUploadImageParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<PetUploadImageResponse>>
    }
}
